const prefix = 'jk_app_'

export const localStorageFn = {
  set(key, value) {
    localStorage.setItem(prefix + key, value)
  },
  get(key) {
    return localStorage.getItem(prefix + key)
  },
  remove(key) {
    localStorage.removeItem(prefix + key)
  },
  clear() {
    localStorage.clear()
  }
}
export const sessionStorageFn = {
  set(key, value) {
    sessionStorage.setItem(prefix + key, value)
  },
  get(key) {
    return sessionStorage.getItem(prefix + key)
  },
  remove(key) {
    sessionStorage.removeItem(prefix + key)
  },
  clear() {
    sessionStorage.clear()
  }
}
